<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPeriodToNewFlowOrders extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('new_flow_orders', function (Blueprint $table) {
            $table->integer('period')->default(0)->comment('期数');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if(Schema::hasTable('new_flow_orders')){
            Schema::table('new_flow_orders', function (Blueprint $table) {
                $table->dropColumn('period');
            });
        }
    }
}
